package test.com.trungsi;

/**
 * Created with IntelliJ IDEA.
 * User: trungsi
 * Date: 18/02/13
 * Time: 00:29
 * To change this template use File | Settings | File Templates.
 */
public class Service1 {

   public static void main(String[] args) {
       
   }

    public void method1() {
        method2();
    }

    public void method2() {
        method3(4, 5);
        method4(new Object(), new Object(), new Object());
    }

    private void method4(Object o, Object o1, Object o2) {
        Object o3 = method7(o);
        Object o4 = method8(o1, o2);

        for (int i = 1; i <= 100; i++) {
            method9(o3, o4);
        }
    }

    private void method9(Object o3, Object o4) {
    	String str = "method9 " + o3 + o4;
        print(str);
    }

    private Object method8(Object o1, Object o2) {
    	String str = "method8 " + o1 + o2;
        print(str);
        int result = method5(10, 20, 30);
        for (int i = 1; i <= result; i++) {
            method6(i);
        }

        return new Object();
    }

    private void method6(int i) {
    	String str = "method6 " + i;
        print(str);
    }

    private void print(String str) {
		System.out.println(str);
	}

	private int method5(int a, int b, int c) {
        print("method5 " + a + b + c);

        return (a + b)*c;
    }

    private Object method7(Object o) {
        print("method7 " + o);

        return new Object();
    }

    private void method3(int a, int b) {
    	for (int i = 1; i <= 100000; i++) {
    		method10(a, b, i);
    	}
        int result = method5(a, b, 6);
        for (int i = 1; i <= result; i++) {
            method6(i);
        }

    }

	private int method10(int a, int b, int i) {
		System.out.println("method10 " + i);
		return a + b + i;
		
	}
}
